package trab_sd;

import java.net.*;
import java.io.*;
import java.util.*;

/**
 *
 * @author moacirnq
 */
public class Trab_sd {

    /**
     * @param args the command line arguments
     */
	//args = ( NomeDoServidor, PortaDoServidor, PortaDeRecepcao, DiretorioCompartilahdo.
		public static void main(String[] args) {
		try {
			//Cria IDs de usuario e de servidor
			UserID me = new UserID( InetAddress.getLocalHost().getHostAddress(), InetAddress.getLocalHost().getHostName(), Integer.parseInt(args[2]) );
			UserID serverID = new UserID (InetAddress.getByName(args[0]).getHostAddress(), InetAddress.getByName(args[0]).getHostName(), Integer.parseInt( args[1]) );
			User i = new User ( me, serverID, args[3]);
			//System.out.println("this is main");
			i.menu();
		}
		catch( Exception e )
		{
			e.printStackTrace();
		}
				
	}
}